<?php

namespace app\api\controller;

use app\common\controller\Api;
use app\common\model\news\News as Newsodel;


/**
 * 文章接口
 */
class News extends Api
{
    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';


    /**
     * 会员中心
     */
    public function index()
    {
        $parmer = $this->request->post();

        $list=Newsodel::getList($parmer);
        $this->success('',$list);
    }

    public function details()
    {
        $id = $this->request->get('id');
        if(empty($id)){
            $this->error('请填写ID');
        }
        $list=Newsodel::details($id);
        $this->success('',$list);
    }

}
